package com.jt.springboot_ssm.controller;

import com.jt.springboot_ssm.pojo.User;
import com.jt.springboot_ssm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController

public class UserController {
    @Autowired
    private UserService userService;
    /*需求:查询全部user表数据
    *请求类型get/set/put/delete
    *  路径:/findUser
    * 请求的参数:无
    * 返回值:list<User>
    */
    @RequestMapping("/getUser")
    public List<User> findUser(){

        return userService.findAll();
    }
}
